import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from 'typeorm';
import { BillingDetails } from './mbillingdetail.entity'; // Adjust the import path as necessary

@Entity({ name: 'made_Billing' })
export class Mbill {
  @PrimaryGeneratedColumn()
  Identify: number;

  @Column()
  Customer: string;

  @Column()
  Date: Date;

  @Column()
  TotalAmount: number;

  @Column()
  ReceivedAmount: number;

  @Column()
  OrderRemarks: string;

  @Column({ type: 'nvarchar', length: 255, unique: true })
  OrderNumber: string;

  @OneToMany(() => BillingDetails, (billingDetails) => billingDetails.mbill)
  billingDetails: BillingDetails[];
}
